from openpyxl import Workbook

wb = Workbook()
# 激活 worksheet
# ws = wb.active
ws1 = wb.create_sheet('test.xlsx',0)
ws2 = wb.create_sheet('用户信息.xlsx',1)

# 具体定位
ws1['A1'] = 'aaa'
ws1['B1'] = 'bbb'
ws1['A2'] = '222'

# cell 方式
ws1.cell(row=5,column=1).value = '大熊课堂'

# 追加方式
rows = (
    ('andy','男',18),
    ('jack','男',50),
    ('张三','男',20)
)
for row in rows:
    ws2.append(row)


wb.save('test.xlsx')

